﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Acoris.Core
{
    using Acoris.Rendering;
    using Acoris.Template;

    /// <summary>
    /// 表示一个渲染引擎
    /// </summary>
    public sealed class CoreRenderEngine
    {
        private RenderTask m_renderTask;

        public CoreRenderEngine()
        {

        }

        #region Task

        /// <summary>
        /// 开始指定的渲染任务
        /// </summary>
        /// <param name="task"></param>
        public void StartTask(RenderTask task)
        {
            if (m_renderTask != null)
            {
                throw new InvalidOperationException();
            }
            m_renderTask = task;
        }

        /// <summary>
        /// 结束当前的渲染任务
        /// </summary>
        public void EndTask()
        {
            if (m_renderTask == null)
            {
                return;
            }
            m_renderTask.Dispose();
            m_renderTask = null;
        }

        #endregion

        public RenderFormat GenStyle(Style style)
        {
            return null;
        }
    }
}
